package agg

import "fmt"

func Logout() (p bool){
	vol := "Volumes"
	if b, _ := PathExists(vol); b {
		if str, err := Getshell("ls", vol); err == false {
			if str == "" {
				Getshell("sudo", "rm", "-r", vol)
			}else{
				fmt.Printf("还有挂载盘没卸载!!!需要卸载完再退出吗? (y/n):")
				fmt.Scanf("%s", &str)
				if str != "n" {
					Uninstall()
					p = true
				}
			}
		}
	}
	return p
}